package cn.edu.zust.zql.controller;

import cn.edu.zust.zql.model.SubjectType;
import cn.edu.zust.zql.service.SubjectTypeService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2016/12/21.
 */
@Controller
@RequestMapping("subjectType")
public class SubjectTypeController {
    @Resource
    private SubjectTypeService service;

    @RequestMapping("index")
    public String index(Map map){
        List<SubjectType> list = service.getAllSubjectType();
        map.put("data", list);
        return "jsp/subjecttype";
    }

}
